package org.bbs.demo.user.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.sql.Date;

@Data
public class UserSignupDto {
    @Null
    private String user_id;     //用户id

    @NotBlank(message = "账号不得为空")
    @Size(min=3,max=16,message = "用户名长度不符")
    private String u_name;      //用户名

    @NotBlank(message = "密码不得为空")
    @Size(min = 5, max = 16, message = "密码长度不符")
    private String password;    //用户密码

    private Date birth;         //用户出生日期

    @Size(max = 1, message = "请输入 男or女")
    private String sex;         //用户性别

    @NotBlank(message = "邮箱不得为空")
    @Size(max = 50, message = "邮箱过长")
    private String mail;        //用户邮箱

    @Size(max = 30, message = "学校名称过长")
    private String school;      //学校名称

    @Size(max = 30, message = "专业名称过长")
    private String major;       //专业名称

    @NotBlank(message = "电话不得为空")
    @Size(max = 15, message = "电话过长")
    private String phone;       //电话
}